package com.xjtu.platform.user.checker.dao;


/**
 * @创建人 mby381
 * @创建时间 2021-12-17
 * @描述
 */

import com.xjtu.platform.user.checker.ReqDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface CheckerDao {

    @Select("select * from requirements")
    List<ReqDto> selectAllRecord();

    @Update("update requirements set stage = #{stage}+1 where request_id=#{request_id}")
    void updSelectedReqStage(ReqDto dto);

    @Update("update requirements set stage = -1 where request_id=#{request_id}")
    void refuseReq(@Param("request_id") String id);
}
